package com.fubowen.reader.extension

import org.jsoup.Jsoup
import org.jsoup.nodes.Document

fun fetchOrThrow(url: String, options: Options = Options()): Document = retryOrThrow(options) {
    Jsoup.connect(url)
        .timeout(options.timeout.toInt())
        .userAgent(options.agent)
        .get()
}